package weiy.top.modules.brand.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.sql.Update;
import org.hibernate.validator.constraints.URL;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import weiy.top.valid.AddGroup;
import weiy.top.valid.UpdateGroup;
import weiy.top.valid.UpdateStatusGroup;

import javax.validation.constraints.*;

/**
 * @Description: pms_brand
 * @Author: weihancheng
 * @Date: 2021-11-24
 * @Version: V1.0
 */
@Data
@TableName("pms_brand")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "pms_brand对象", description = "pms_brand")
public class PmsBrand implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 品牌id
     */
    @Excel(name = "品牌id", width = 15)
    @ApiModelProperty(value = "品牌id")
    @TableId(type = IdType.ASSIGN_ID)
    @NotNull(groups = {UpdateGroup.class, UpdateStatusGroup.class}, message = "修改品牌id必须不为空")
    @Null(groups = AddGroup.class, message = "新增品牌id必须为空")
    private java.lang.String brandId;
    /**
     * 品牌名
     */
    @Excel(name = "品牌名", width = 15)
    @ApiModelProperty(value = "品牌名")
    @NotEmpty
    @NotBlank(groups = {AddGroup.class, UpdateGroup.class}, message = "品牌名不能为空")
    private java.lang.String name;
    /**
     * logo
     */
    @Excel(name = "logo", width = 15)
    @ApiModelProperty(value = "logo")
    @URL(groups = {AddGroup.class, UpdateGroup.class}, message = "logo必须是一个合法的url地址")
    @NotBlank(groups = {AddGroup.class, UpdateGroup.class}, message = "品牌logo地址不能为空")
    private java.lang.String logo;
    /**
     * 介绍
     */
    @Excel(name = "介绍", width = 15)
    @ApiModelProperty(value = "介绍")
    @NotBlank(groups = {AddGroup.class, UpdateGroup.class}, message = "介绍不能为空")
    private java.lang.String descript;
    /**
     * 是否显示 【0不显示 1显示】
     */
    @Excel(name = "是否显示 【0不显示 1显示】", width = 15)
    @ApiModelProperty(value = "是否显示 【0不显示 1显示】")
    @NotNull(groups = {AddGroup.class, UpdateGroup.class, UpdateStatusGroup.class}, message = "显示状态不能为空")
    private java.lang.Integer showStatus;
    /**
     * 检索首字母
     */
    @Excel(name = "检索首字母", width = 15)
    @ApiModelProperty(value = "检索首字母")
    @NotBlank(groups = {AddGroup.class, UpdateGroup.class}, message = "检索首字母不能为空")
    @Pattern(groups = {AddGroup.class, UpdateGroup.class}, regexp = "^[a-zA-Z]$", message = "检索首字母必须是一个字母")
    private java.lang.String firstLetter;
    /**
     * 排序
     */
    @Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    @NotNull(groups = {AddGroup.class, UpdateGroup.class}, message = "排序不能为空")
    @Min(groups = {AddGroup.class, UpdateGroup.class}, value = 0, message = "排序必须大于等于0")
    private java.lang.Integer sort;
}
